package com.todo.strategy.online.iface.request;

import com.todo.common.common.entity.CurrentUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author azhebuxing
 * @date 2024/5/9 15:54
 * @description
 */
@Data
@Schema(title = "插入我想去关联入参", description = "插入我想去关联入参")
public class InsertWantSetRelationParam {

    private CurrentUser _user;

    @Schema(title = "我想去Id", description = "我想去Id")
    private Long wantId;

    @Schema(title = "关联类型", description = "关联类型")
    private Integer relationType;

    @Schema(title = "关联id", description = "关联id")
    private Long relationId;

    @Schema(title = "关联城市", description = "关联城市")
    private String relationCity;

    @Schema(title = "排序", description = "排序")
    private Integer sort;

    @Schema(title = "自定义信息", description = "自定义信息，关联类型为 CUSTOM[4]有值")
    private CustomInfo customInfo;

    public boolean baseCheck() {
        if (wantId == null || relationType == null){
            return false;
        }
        return true;
    }

    @Data
    public static class CustomInfo {

        @Schema(title = "自定义名称", description = "自定义名称")
        private String name;

        @Schema(title = "自定义类型", description = "自定义类型")
        private String customType;

        @Schema(title = "详细地址", description = "详细地址")
        private String address;

        @Schema(title = "经度", description = "经度")
        private BigDecimal lon;

        @Schema(title = "纬度", description = "纬度")
        private BigDecimal lat;

        @Schema(title = "备注", description = "备注")
        private String remark;
    }
}
